package com.huluobo.a2107kotlinshopping.category

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.huluobo.a2107kotlinshopping.R
import com.huluobo.a2107kotlinshopping.utils.ImageUtils

/**
 *  Created by LC on 2023/11/20.
 */
class CategoryGoodsListAdapter(list: MutableList<CategoryGoodsBean>) :
    BaseQuickAdapter<CategoryGoodsBean, BaseViewHolder>(
        R.layout.item_category_goods_list, list
    ) {
    override fun convert(helper: BaseViewHolder, item: CategoryGoodsBean) {
        helper.setText(R.id.item_category_list_tv_desc, item.goods_desc)
        helper.setText(R.id.item_category_list_tv_price, item.goods_default_price.toString())
        ImageUtils.loadImage(context, item.goods_default_icon, helper.getView(R.id.item_category_list_iv))
    }
}